<?php

namespace App\Http\Controllers\Api;

use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;
use App\Facades\Utils\ValidateParameter;
use App\Facades\Services\MessageService;

class MessageController extends Controller
{
    public function create(Request $request){

        $rules = [
            'message_id' => 'required|exists:messages,id',
            'reply_content' => 'required'
        ];

        ValidateParameter::validate($request,$rules);

        $data= $request->all();

        MessageService::createReply($data);

        return formatJsonResponse();
    }
}
